package com.terrynoya.fight.evaluation
{
	import com.terrynoya.fight.emuns.Operator;

	public class SpecialFunctions
	{
		public function SpecialFunctions()
		{
		}
		
		public static function compare(oper:int,lhs:*,rhs:*):Boolean
		{
			var rlt:Boolean = false;
			switch(oper)
			{
				case Operator.Equals:
				{
					rlt = lhs == rhs;
					break;
				}
				case Operator.Greater:
				{
					rlt = lhs > rhs;
					break;
				}
				case Operator.GreaterEquals:
				{
					rlt = lhs >= rhs;
					break;
				}
				case Operator.Lesser:
				{
					rlt = lhs < rhs;
					break;
				}
				case Operator.LesserEquals:
				{
					rlt = lhs <= rhs;
					break;
				}
				case Operator.NotEquals:
				{
					rlt = lhs != rhs;
					break;
				}
			}
			return rlt;
		}
	}
}